layui.extend({
    baseConfig : "/js/pages/baseConfig"
})
layui.use(['form','layer','laydate','table','laytpl','element','util','baseConfig'],function(){

    var form = layui.form,
        layer = parent.layer === undefined ? layui.layer : top.layer,
        $ = layui.jquery,
        baseConfig = layui.baseConfig,
        table = layui.table;
    var util = layui.util;
    var tableIns = table.render({
        elem: '#list',
        url : '/relever/list/',
        text: { none: "Aucun résultat"},
        cellMinWidth : 95,
        height : "full-125",
        id : "listTable",
        cols : [[
            {field: 'date', title: "Date", align:"center", templet : function( d){
                return baseConfig.formatDate( d.date);
            }},
            {field: 'dateValeur', title: "Date valeur", align:"center", templet : function( d){
                return baseConfig.formatDate( d.dateValeur);
            }},
            {field: 'contrepartie', title: "Contrepartie", align:'center'},
            {field: 'methode', title: "Méthode", align:'center'},
            {field: 'debit', title: "Debit", align:'center'},
            {field: 'credit', title: "Credit", align:'center'},
        ]],
        response : {
            statusCode: 200 //规定成功的状态码，默认：0
        },
        parseData : function( res){ //res 即为原始返回的数据
            return {
                "code": res.code, //解析接口状态
                "msg": res.msg, //解析提示文本
                "data": res.data //解析数据列表
            };
        }
    });
});
